/**
 * 发送顶层消息
 * @type {String}
 */
export const SEND_TOP_INFO = 'send top information';

/**
 * 关闭顶层消息
 * @type {String}
 */
export const CLOSE_TOP_INFO = 'close top information';

/**
 * 消息类型
 * @type {Object}
 */
export const ENUM_INFO_TYPE = {
	ERROR: 0,
	INFO: 1,
	WARN: 2
};

/**
 * 发送顶层消息
 * @param  {String} message     消息内容
 * @param  {Enum_INFO_TYPE} messageType 消息类型
 */
export const sendTopInfo = (message, messageType) => ({ type: SEND_TOP_INFO, payload: { message, messageType } });

/**
 * 关闭消息
 * @return {[type]} [description]
 */
export const closeTopInfo = () => ({ type: CLOSE_TOP_INFO });